#ifndef SSICLOUD_APPTRIP_REPORT_H
#define SSICLOUD_APPTRIP_REPORT_H

#include "ssicloud_item_object.h"
#include "ssicloud_list_object.h"

namespace ssicloud {
/**
 * @brief The ApptripReport class
 *  行程分析-行程统计, 单结构体，用于统计数据
 * @note 完成 -- 验证OK
 */
class ApptripReport : public ItemObject<ApptripNode>
{
public:
    ApptripReport();

    //! 获取数据
    bool requestAll(const char *start = "2021-05-01", const char *end = "2021-05-31");

    //! 调试信息
    void profile();

protected:
    //! 分析数据
    int genResult(NetBuffer *data);

private:
    char m_body[1024];
};

/**
 * @brief The LocationTravel class
 * 行程分析-按时间查询
 */
class LocationTravel : public ItemObject<LocationTravelNode>
{
public:
    LocationTravel();

    //! 获取数据
    bool requestAll(const char *start = "2021-05-01", const char *end = "2021-05-31", int curPage = 1, int pageSize = 10);

    //! 调试信息
    void profile();

protected:
    //! 分析数据
    int genResult(NetBuffer *data);

private:
    char m_body[1024];
};

/**
 * @brief The ApptripDistribution class
 *  行程分析-油门踏板分布
 */
class  ApptripDistribution : public ListObject<ApptripDistributionNode>
{
public:
    ApptripDistribution();

    //! 获取数据
    bool requestAll(const char *start = "2021-05-01", const char *end = "2021-05-31");

    //! 调试信息
    void profile();

protected:
    //! 分析数据
    int genResult(NetBuffer *data);

private:
    char m_body[1024];

    // responed
    ByteString m_chassisNo;
    ByteString m_plateNo;
};

/**
 * @brief The ApptripDistributionRpm class
 * 行程分析-转速分布
 */
class ApptripDistributionRpm : public ListObject<ApptripDistributionRpmNode>
{
public:
    ApptripDistributionRpm();

    //! 获取数据
    bool requestAll(const char *start = "2021-05-01", const char *end = "2021-05-31");

    //! 调试信息
    void profile();

protected:
    //! 分析数据
    int genResult(NetBuffer *data);

private:
    char m_body[1024];

    // responed
    ByteString m_chassisNo;
    ByteString m_plateNo;
};

class ApptripDistributionSpeed : public ListObject<ApptripDistributionSpeedNode>
{
public:
    ApptripDistributionSpeed();

    //! 获取数据
    bool requestAll(const char *start = "2021-05-01", const char *end = "2021-05-31");

    //! 调试信息
    void profile();

protected:
    //! 分析数据
    int genResult(NetBuffer *data);

private:
    char m_body[1024];

    // responed
    ByteString m_chassisNo;
    ByteString m_plateNo;
};

}

#endif // SSICLOUD_APPTRIP_REPORT_H
